<div id="bands">

  <% if artist.bands.empty? %>
    There are no bands for this artist. Know of one?

  <% else %>

    <%- artist.bands.each do |band| -%>
      <div class="band-pane">

        <% if band.band.primary_image.nil? %>
          <img src="/images/REDUX.jpg" alt="Band Art" width="100" height="100">
        <% else %>
          <%= image_tag band.band.primary_image.url(:medium) %>
        <% end %>

        <%= link_to band.band.name, band.band %><br />
		<% band.membership_dates.each do |d| %>
		  <%=h d.event %>:
		  <%=h d.date_string_with_month %>
		  <br />
		<% end %>
        Role:<%=h band.role %><br />
        <br />
      </div><!-- /band-pane -->
    <%- end -%>
  <% end %>

</div><!-- bands -->
